<!DOCTYPE html>
<html lang="en">

	<head>
		<meta charset="UTF-8">
		<title>系统用户管理</title>
		<link rel="stylesheet" href="../../js/bower_components/bootstrap/dist/css/bootstrap.min.css">
		<link rel="stylesheet" href="../../js/bower_components/bootstrap-select/dist/css/bootstrap-select.min.css">
		<link rel="stylesheet"
			href="../../js/bower_components/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css">
		<link rel="stylesheet" href="../../js/bower_components/bootstrap-table/dist/bootstrap-table.min.css">
		<link rel="stylesheet" href="../../js/bower_components/bootstrap-treeview/dist/bootstrap-treeview.min.css">

		<script src="../../js/bower_components/jquery/dist/jquery.min.js"></script>
		<script src="../../js/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
		<script src="../../js/bower_components/bootbox.min.js"></script>
		<script src="../../js/bower_components/bootstrap-select/js/bootstrap-select.js"></script>
		<script src="../../js/bower_components/bootstrap-switch/dist/js/bootstrap-switch.min.js"></script>
		<script src="../../js/bower_components/bootstrap-table/dist/bootstrap-table.min.js"></script>
		<script src="../../js/bower_components/bootstrap-table/dist/locale/bootstrap-table-zh-CN.js"></script>

		<script src="../../js/bower_components/bootstrap-treeview/dist/bootstrap-treeview.min.js"></script>
		<script src="../../js/bower_components/jquery-form-validator/form-validator/jquery.form-validator.min.js">
		</script>
		<script src="../../js/bower_components/moment/min/moment-with-locales.min.js"></script>
		<script>
			$(function() {
				initRole();
			});

			function initRole() {
				$("#selRole").empty;
				console.log("-----")
				$.ajax({
					type: "get",
					url: "http://121.37.241.58:8883/logic/baseInfo/sysUser/roleList",
					dataType: "json",
					success: function(res) {
						console.log(res);
						if (!res.flag) {
							$.each(res, function(i, n) {
								$("#selRole").append("<option value=\"" + n.role + "\">" + n.role +
									"</option>")
							});
							$("#selRole").append("<option value='全部'>全部</option>");
							$("#selRole").selectpicker('refresh');
						}
					}
				})
			}
		</script>
	</head>

	<body>
		<div class="container-fluid">
			<!--查询区域 -->
			<div class="row col-md-10">
				<div id="SearchForm" class="form-inline">
					<div class="input-group">
						<label for="txtUid" class="control-label">用户名</label>
						<input type="text" id="txtUid" />
					</div>
					<div class="input-group">
						<label for="selRole" class="control-label">用户权限</label>
						<select id="selRole"></select>
					</div>
					<div class="form-group">
						<button type="button" id="btn-search" class="btn btn-primary">搜索</button>
					</div>
				</div>
			</div>
			<!-- 列表区域 -->
			<div class="row col-md-10">
				<table id="tblResult"></table>
			</div>
		</div>
	</body>

</html>
